import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import { resolve } from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [uni()],
  base: './',
  resolve: {
    alias: {
      '@': resolve(__dirname, 'src'),
      '~': resolve(__dirname, 'node_modules')
    }
  },
  css: {
    preprocessorOptions: {
      scss: {
        // 启用新的 Sass 模块系统
        additionalData: `@use "sass:map"; @use "sass:string"; @use "sass:meta";`
      }
    }
  }
})
